# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-test-checkdeps
pkgver=0.010
_distdir="Test-CheckDeps-$pkgver"
pkgrel=13
pkgdesc='Check for presence of dependencies.'
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl' 'perl-cpan-meta-check' 'perl-module-build-tiny')
makedepends=()
url='http://search.cpan.org/dist/Test-CheckDeps'
source=("http://search.cpan.org/CPAN/authors/id/L/LE/LEONT/Test-CheckDeps-$pkgver.tar.gz")
sha512sums=('9683b81aa6bce358fa1abc9b2337b9b15b274742f08a3fd71e80df0bfd20619406cdded191aafdd103db8d514bdc20d36a0b60aefbd72d3de6cb117c17461697')

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'"     \
      MODULEBUILDRC=/dev/null

    cd $_distdir

    /usr/bin/perl Makefile.PL --installdirs vendor --destdir "$pkgdir"

    make
  )
}

package() {
  cd $_distdir

  make install

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}

